import { request } from "@/utils/request";

/**
 * 获取菜单列表数据
 * @returns {promise} Promise
 */
export async function dataMenuListApi(data) {
  let res = await request(
    '/report/reportmenu/list',
    data
  )
  return res;
}

/**
 * 新增父菜单
 * @returns {promise} Promise
 */
  export async function dataSaveMenuApi(data) {
    let res = await request(
      '/report/reportmenu/saveMenu',
      data
    )
    return res;
  }

/**
 * 编辑父菜单
 * @returns {promise} Promise
 */
  export async function dataEditMenuApi(data) {
  let res = await request(
    '/report/reportmenu/updateMenu',
    data
  )
  return res;
}

/**
 * 删除父菜单
 * @returns {promise} Promise
 */
 export async function dataRemoveMenuApi(data) {
  let res = await request(
    '/report/reportmenu/removeMenu',
    data
  )
  return res;
}

/**
 * 新增子菜单
 * @returns {promise} Promise
 */
 export async function dataSaveSubMenuApi(data) {
  let res = await request(
    '/report/reportmenu/saveSubMenu',
    data
  )
  return res;
}

/**
  * 编辑子菜单
  * @returns {promise} Promise
  */
  export async function dataEditSubMenuApi(data) {
  let res = await request(
    '/report/reportmenu/updateSubMenu',
    data
  )
  return res;
}

/**
  * 删除子菜单
  * @returns {promise} Promise
  */
  export async function dataRemoveSubMenuApi(data) {
  let res = await request(
    '/report/reportmenu/removeSubMenu',
    data
  )
  return res;
}